package view;

import javax.swing.JPanel;
import javax.swing.JScrollPane;
import java.awt.BorderLayout;
import javax.swing.JList;
import javax.swing.AbstractListModel;
import javax.swing.JLabel;

/** The ListAuctipon class */
@SuppressWarnings("serial")
public class ListAuction extends JPanel {

	/**
	 * @author Bob Landowski
	 * @author Eric Struck
	 */
	@SuppressWarnings({ "unchecked", "rawtypes" })
	public ListAuction() {
		setLayout(new BorderLayout(0, 0));
		
		JScrollPane scrollPane = new JScrollPane();
		add(scrollPane, BorderLayout.CENTER);
		
		JList list = new JList();
		list.setModel(new AbstractListModel() {
			String[] values = new String[] {"123456789021y74983", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"};
			public int getSize() {
				return values.length;
			}
			public Object getElementAt(int index) {
				return values[index];
			}
		});
		scrollPane.setViewportView(list);
		
		JLabel lblListOfCurrent = new JLabel("List of Current Auctions");
		add(lblListOfCurrent, BorderLayout.NORTH);

	}

}
